import xFetch, {
    get,
    post
} from '../util/xFetch';
import Service from '../service';
const API = {
    SERVICES_QUERY: `${Service.baseUrl}/admin/admin/index`,
    SERVICES_NEWUSER: `${Service.baseUrl}/admin/admin/add`,
    SERVICES_QUERYUSER: `${Service.baseUrl}/earlywarn/user/detail`,
    SERVICES_UPDATE: `${Service.baseUrl}/auth/register`,
    BIND_ROLE: `${Service.baseUrl}/earlywarn/role/bangUserRole`
}
// 查询服务列表
export const queryList = async (params) => post(API.SERVICES_QUERY, params);
//新增用户
export const addUser = async (params) => post(API.SERVICES_NEWUSER, params);
//查询用户
export const queryUser = async ({
    id,
    userId
}) => post(API.SERVICES_QUERYUSER, {
    id,
    userId
});
//更新用户信息
export const queryUpdate = async (params) => post(API.SERVICES_UPDATE, params);
//绑定用户权限
export const bangUserRole = async (params) => post(API.BIND_ROLE, params);